package com.xuetang9.t9.xinhuaxia.beans;

import javax.persistence.*;

@Table(name = "social_chat")
public class SocialChat {
    /**
     * 帖子id
     */
    @Column(name = "p_id")
    private Integer pId;

    /**
     * 用户id
     */
    @Column(name = "p_userid")
    private Integer pUserid;

    @Column(name = "p_chatid")
    private Integer pChatid;

    /**
     * 获取帖子id
     *
     * @return p_id - 帖子id
     */
    public Integer getpId() {
        return pId;
    }

    /**
     * 设置帖子id
     *
     * @param pId 帖子id
     */
    public void setpId(Integer pId) {
        this.pId = pId;
    }

    /**
     * 获取用户id
     *
     * @return p_userid - 用户id
     */
    public Integer getpUserid() {
        return pUserid;
    }

    /**
     * 设置用户id
     *
     * @param pUserid 用户id
     */
    public void setpUserid(Integer pUserid) {
        this.pUserid = pUserid;
    }

    /**
     * @return p_chatid
     */
    public Integer getpChatid() {
        return pChatid;
    }

    /**
     * @param pChatid
     */
    public void setpChatid(Integer pChatid) {
        this.pChatid = pChatid;
    }

    private User user;

    private Chat chat;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Chat getChat() {
        return chat;
    }

    public void setChat(Chat chat) {
        this.chat = chat;
    }

    @Override
    public String toString() {
        return "SocialChat{" +
                "pId=" + pId +
                ", pUserid=" + pUserid +
                ", pChatid=" + pChatid +
                ", user=" + user +
                ", chat=" + chat +
                '}';
    }
}